#ifndef Plot2D_h
#define Plot2D_h

//<Header file>
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <TSelector.h>
#include <TLorentzVector.h>
#include <TRandom3.h>
#include <TH1F.h>
#include <TH2F.h>
#include <iomanip>
#include <iostream>
#include <string>
#include "HZZ4l.h"
using namespace std;


//<Predefined Constants>
const double PI=3.1415926;
const double ZMass=91.1876e3; //MeV
const double m_mass=105.658367; //MeV
const double e_mass = 0.510998910; //MeV
const double Unit_GeV = 1000.; //MeV
const int    Nch = 6;

//<Analysis class>
class Plot2D : public HZZ4l {

public:
   TFile *froot;
   // plots without m4l cut
   TH2F *h2DMZZMZ1_data[Nch], *h2DMZZMZ2_data[Nch], *h2DMZ1MZ2_data[Nch]; 
   TH2F *h2DMZZMZ1_mc[Nch], *h2DMZZMZ2_mc[Nch], *h2DMZ1MZ2_mc[Nch]; 
   // plots with m4l cut, 118-130
   TH2F *h2DMZZMZ1_Cut_data[Nch], *h2DMZZMZ2_Cut_data[Nch], *h2DMZ1MZ2_Cut_data[Nch]; 
   TH2F *h2DMZZMZ1_Cut_mc[Nch], *h2DMZZMZ2_Cut_mc[Nch], *h2DMZ1MZ2_Cut_mc[Nch]; 

   //couter
   double Ncount_data[Nch], Ncount_mc[Nch];
   double Ncount_Cut_data[Nch], Ncount_Cut_mc[Nch];
   vector<double> vec_MZZ[Nch], vec_MZ1[Nch], vec_MZ2[Nch]; //data only
   vector<double> vec_Cut_MZZ[Nch], vec_Cut_MZ1[Nch], vec_Cut_MZ2[Nch]; //data only
 
   // ch 
   vector<string> ch;

   Plot2D();
   virtual ~Plot2D() { }
   bool    LoadEntry(long entry);
   bool    ProcessEntry(long entry, string ch, int nch);
   void    Terminate();

};

#endif
